-
Notifications
You must be signed in to change notification settings - Fork 25
chore(track-performance): local iteration #1642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add local developer tooling for triggering C-Chain reexecution benchmarks. Includes just recipe, gh CLI in nix devshell, and usage documentation in METRICS.md.
rkuris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All my changes are just nits, feel free to use or ignore them and get this merged.
| echo "https://github.com/ava-labs/firewood/actions/runs/$run_id" | ||
| echo "" | ||
|
|
||
| $GH run watch "$run_id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to use this or watch it on the web? Maybe we shouldn't run this and let them choose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the script already resolves and wraps the gh CLI (falling back to nix if needed), waiting by default keeps the experience consistent for users who have the tooling set up. The URL is printed before the watch starts, so users can open it in their browser and Ctrl+C to exit if they prefer the web UI.
Line 190 in 12e170b
| # Resolve gh CLI |
Does that work for you, or would you prefer adding a something like no-wait flag?
Co-authored-by: Ron Kuris <ron.kuris@avalabs.org> Signed-off-by: Elvis <43846394+Elvis339@users.noreply.github.com>
## Why Track C-Chain reexecution benchmark performance over time. Catch regressions before production. Closes #1494 ## How Firewood → triggers AvalancheGo benchmark → downloads results → publishes to GitHub Pages <img width="746" height="509" alt="Screenshot 2026-01-27 at 16 12 02" src="https://github.com/user-attachments/assets/ff372ef3-67b8-450e-8874-5289517130c8" /> ## Changes - `scripts/bench-cchain-reexecution.sh` - Trigger AvalancheGo's C-Chain reexecution benchmark - Poll for workflow registration - Wait for completion and download artifacts - `.github/workflows/track-performance.yml` - Orchestrate benchmark trigger via the script - Publish results to GitHub Pages (main → `bench/`, branches → `dev/bench/{branch}/`) ## Usage ``` # Auth nix run ./ffi#gh -- auth login export GH_TOKEN=$(nix run ./ffi#gh -- auth token) # Predefined test ./scripts/bench-cchain-reexecution.sh trigger firewood-101-250k # With specific Firewood version FIREWOOD_REF=v0.0.18 ./scripts/bench-cchain-reexecution.sh trigger firewood-101-250k # Custom block range RUNNER=avalanche-avalanchego-runner-2ti \ FIREWOOD_REF=v0.0.18 \ CONFIG=firewood \ START_BLOCK=1 \ END_BLOCK=100 \ BLOCK_DIR_SRC=cchain-mainnet-blocks-200-ldb \ ./scripts/bench-cchain-reexecution.sh trigger # Other commands ./scripts/bench-cchain-reexecution.sh tests # list available tests ./scripts/bench-cchain-reexecution.sh list # list recent runs ./scripts/bench-cchain-reexecution.sh status <run_id> ``` - Set `FIREWOOD_REF=v0.0.18` explicitly. Without it, the workflow builds from `HEAD`, which currently fails due to changes in FFI layer ### Related AvalancheGo: ava-labs/avalanchego#4650 Local iteration PR: #1642 Followup: #1639 --------- Signed-off-by: Elvis <43846394+Elvis339@users.noreply.github.com> Co-authored-by: rodrigo <77309055+RodrigoVillar@users.noreply.github.com> Co-authored-by: Ron Kuris <ron.kuris@avalabs.org>
| just bench-cchain firewood-101-250k | ||
|
|
||
| # With specific Firewood version | ||
| FIREWOOD_REF=v0.1.0 just bench-cchain firewood-33m-40m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you mentioned that just supports named parameters. If so, could you please used named parameters wherever possible?
| | Variable | Default | Description | | ||
| |----------|---------|-------------| | ||
| | `FIREWOOD_REF` | current commit | Firewood commit/tag/branch to build | | ||
| | `AVALANCHEGO_REF` | master | AvalancheGo ref to test against | | ||
| | `LIBEVM_REF` | - | Optional libevm ref | | ||
| | `RUNNER` | avalanche-avalanchego-runner-2ti | GitHub Actions runner | | ||
| | `TIMEOUT_MINUTES` | - | Workflow timeout | | ||
| | `DOWNLOAD_DIR` | ./results | Directory for downloaded artifacts | | ||
|
|
||
| **Custom mode variables** (when no test specified): | ||
|
|
||
| | Variable | Default | Description | | ||
| |----------|---------|-------------| | ||
| | `CONFIG` | firewood | VM config (firewood, hashdb, etc.) | | ||
| | `START_BLOCK` | required | First block number | | ||
| | `END_BLOCK` | required | Last block number | | ||
| | `BLOCK_DIR_SRC` | required | S3 block directory | | ||
| | `CURRENT_STATE_DIR_SRC` | - | S3 state directory (empty = genesis run) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is a repetition of:
firewood/scripts/bench-cchain-reexecution.sh
Lines 16 to 31 in 06c4d0a
| # ENVIRONMENT | |
| # GH_TOKEN GitHub token for API access (required) | |
| # TEST Predefined test name, alternative to arg (optional) | |
| # FIREWOOD_REF Firewood commit/tag/branch, empty = AvalancheGo's go.mod default (optional) | |
| # AVALANCHEGO_REF AvalancheGo ref to test against (default: master) | |
| # RUNNER GitHub Actions runner label (default: avalanche-avalanchego-runner-2ti) | |
| # LIBEVM_REF libevm ref (optional) | |
| # TIMEOUT_MINUTES Workflow timeout in minutes (optional) | |
| # DOWNLOAD_DIR Directory for downloaded artifacts (default: ./results) | |
| # | |
| # Custom mode (when no TEST/test arg specified): | |
| # CONFIG VM config (default: firewood) | |
| # START_BLOCK First block number (required) | |
| # END_BLOCK Last block number (required) | |
| # BLOCK_DIR_SRC S3 block directory, e.g., cchain-mainnet-blocks-200-ldb (required) | |
| # CURRENT_STATE_DIR_SRC S3 state directory, empty = genesis run (optional) |
Would it make sense to just tell clients to look at the documentation in scripts/bench-cchain-reexecution.sh for all possible options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the requirements of adding GAB to Firewood was that developers would be able to create a branch from main, push a commit, and run GAB against their new branch. From this though, it's not evident that it's supported and that there's no documentation for this common workflow. Could we add a section walking through what running benchmarks against a branch would look like?
Add local developer tooling for triggering C-Chain reexecution benchmarks. Includes just recipe, gh CLI in nix devshell, and usage documentation in METRICS.md.
Note: should be merged after #1493
Why this should be merged
Enables developers to trigger C-Chain reexecution benchmarks from their local environment without navigating GitHub Actions UI. This complements the
track-performance.ymlworkflow by providing a CLI interface.How this works
The
bench-cchainrecipe:track-performance.ymlviagh workflow runEnvironment variables support custom configurations:
FIREWOOD_REF- specific commit/tag to benchmarkAVALANCHEGO_REF- AvalancheGo version to test againstSTART_BLOCK,END_BLOCK,BLOCK_DIR_SRC- custom block rangesHow this was tested